﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using YFIN.View.ViewModels;
using YFIN.View.ReminderServiceRef;

namespace YFIN.View.Lockbox
{
    public partial class Reminder :UserControl
    {
        ReminderVM _rvm;
        public Reminder()
        {
            InitializeComponent();
            _rvm = new ReminderVM();
            this.DataContext = _rvm;
        }
        private void edit_Click(object sender, RoutedEventArgs e)
        {
            _rvm.Update(((Button)sender).DataContext);
        }
        private void delete_Click(object sender, RoutedEventArgs e)
        {
            _rvm.Reminder = ((Button)sender).DataContext as ModelReminder;
            _rvm.Delete();
        }
    }
}
